from core.gua_params.handle_gua_params import handle_coinNum
from core.time.handle_time import handle_time_string,parse_datetime_2_ganzhi
def build_dict(coinNum,timeStr='',solartime=None,title=None):
    gua_dict = {'title':title if title else 'default title'}
    params = handle_coinNum(coinNum)
    if solartime:
        # print('input solarDateTime:',solarDateTime)
        time_dict = parse_datetime_2_ganzhi(solartime)
    else:
        time_dict = handle_time_string(timeStr)
    gua_dict.update(params)
    gua_dict.update(time_dict)
    # print('contain keys:',[k for k in gua_dict])
    return gua_dict

if __name__ == '__main__':
    test_cases = [
        {'coinNum':'123412'},
        {'coinNum':123412},
    ]